package com.ruoyi;

import org.harsh.app.ServerApp;
import org.harsh.transmission.client.NodeClient;
import org.harsh.transmission.server.NodeServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@ComponentScan({"com.ruoyi.*","org.harsh.*"})
public class RuoYiApplication
{
    public static void main(String[] args)
    {
        // System.setProperty("spring.devtools.restart.enabled", "false");
        ConfigurableApplicationContext ctx = SpringApplication.run(RuoYiApplication.class, args);
        NodeServer nodeServer = (NodeServer) ctx.getBean("nodeServer");
        nodeServer.start();
        System.out.println(" Server 启动成功 \n");
    }
}